Hệ thống quản lý bệnh viện bằng C# với mã nguồn

  • hospitalDataSet3.Designer.cs
  • project /
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated
by a tool.
4 // Runtime Version:
4.0.30319.42000
5 //
6 // Changes to
this file may cause incorrect behavior and will be lost if
7 // the code
is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------

10
11 #pragma warning disable
1591
12
13 namespace
HospitalManagementSystemCSharp {
14     
15     
16     ///
<summary>
17     ///
Represents a strongly typed in-memory cache of data.
18     ///</summary>

19     
[global::System.Serializable()]
20     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
21     
[global::System.ComponentModel.ToolboxItem(true)]
22     
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
23     
[global::System.Xml.Serialization.XmlRootAttribute("hospitalDataSet3")]
24     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
25     
public partial class hospitalDataSet3 : global::System.Data.DataSet {
26         
27         
private checkoutDataTable tablecheckout;
28         
29         
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
30         
31         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
32         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
33         
public hospitalDataSet3() {
34             
this.BeginInit();
35             
this.InitClass();
36             
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
37             
base.Tables.CollectionChanged += schemaChangedHandler;
38             
base.Relations.CollectionChanged += schemaChangedHandler;
39             
this.EndInit();
40         }
41         
42         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
43         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
44         
protected hospitalDataSet3(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
45                 
base(info, context, false) {
46             
if ((this.IsBinarySerialized(info, context) == true)) {
47                 
this.InitVars(false);
48                 
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
49                 
this.Tables.CollectionChanged += schemaChangedHandler1;
50                 
this.Relations.CollectionChanged += schemaChangedHandler1;
51                 
return;
52             }
53             
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
54             
if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
55                 
global::System.Data.DataSet ds = new global::System.Data.DataSet();
56                 ds.ReadXmlSchema(
new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
57                 
if ((ds.Tables["checkout"] != null)) {
58                     
base.Tables.Add(new checkoutDataTable(ds.Tables["checkout"]));
59                 }
60                 
this.DataSetName = ds.DataSetName;
61                 
this.Prefix = ds.Prefix;
62                 
this.Namespace = ds.Namespace;
63                 
this.Locale = ds.Locale;
64                 
this.CaseSensitive = ds.CaseSensitive;
65                 
this.EnforceConstraints = ds.EnforceConstraints;
66                 
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
67                 
this.InitVars();
68             }
69             
else {
70                 
this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
71             }
72             
this.GetSerializationData(info, context);
73             
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
74             
base.Tables.CollectionChanged += schemaChangedHandler;
75             
this.Relations.CollectionChanged += schemaChangedHandler;
76         }
77         
78         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
79         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
80         
[global::System.ComponentModel.Browsable(false)]
81         
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
82         
public checkoutDataTable checkout {
83             
get {
84                 
return this.tablecheckout;
85             }
86         }
87         
88         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
89         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
90         
[global::System.ComponentModel.BrowsableAttribute(true)]
91         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
92         
public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
93             
get {
94                 
return this._schemaSerializationMode;
95             }
96             
set {
97                 
this._schemaSerializationMode = value;
98             }
99         }
100         
101         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
102         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
103         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
104         
public new global::System.Data.DataTableCollection Tables {
105             
get {
106                 
return base.Tables;
107             }
108         }
109         
110         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
111         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
112         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
113         
public new global::System.Data.DataRelationCollection Relations {
114             
get {
115                 
return base.Relations;
116             }
117         }
118         
119         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
120         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
121         
protected override void InitializeDerivedDataSet() {
122             
this.BeginInit();
123             
this.InitClass();
124             
this.EndInit();
125         }
126         
127         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
128         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
129         
public override global::System.Data.DataSet Clone() {
130             hospitalDataSet3 cln = ((hospitalDataSet3)(
base.Clone()));
131             cln.InitVars();
132             cln.SchemaSerializationMode =
this.SchemaSerializationMode;
133             
return cln;
134         }
135         
136         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
137         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
138         
protected override bool ShouldSerializeTables() {
139             
return false;
140         }
141         
142         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
143         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
144         
protected override bool ShouldSerializeRelations() {
145             
return false;
146         }
147         
148         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
149         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
150         
protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
151             
if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
152                 
this.Reset();
153                 
global::System.Data.DataSet ds = new global::System.Data.DataSet();
154                 ds.ReadXml(reader);
155                 
if ((ds.Tables["checkout"] != null)) {
156                     
base.Tables.Add(new checkoutDataTable(ds.Tables["checkout"]));
157                 }
158                 
this.DataSetName = ds.DataSetName;
159                 
this.Prefix = ds.Prefix;
160                 
this.Namespace = ds.Namespace;
161                 
this.Locale = ds.Locale;
162                 
this.CaseSensitive = ds.CaseSensitive;
163                 
this.EnforceConstraints = ds.EnforceConstraints;
164                 
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
165                 
this.InitVars();
166             }
167             
else {
168                 
this.ReadXml(reader);
169                 
this.InitVars();
170             }
171         }
172         
173         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
174         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
175         
protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
176             
global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
177             
this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
178             stream.Position =
0;
179             
return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
180         }
181         
182         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
183         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
184         
internal void InitVars() {
185             
this.InitVars(true);
186         }
187         
188         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
189         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
190         
internal void InitVars(bool initTable) {
191             
this.tablecheckout = ((checkoutDataTable)(base.Tables["checkout"]));
192             
if ((initTable == true)) {
193                 
if ((this.tablecheckout != null)) {
194                     
this.tablecheckout.InitVars();
195                 }
196             }
197         }
198         
199         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
200         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
201         
private void InitClass() {
202             
this.DataSetName = "hospitalDataSet3";
203             
this.Prefix = "";
204             
this.Namespace = "http://tempuri.org/hospitalDataSet3.xsd";
205             
this.EnforceConstraints = true;
206             
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
207             
this.tablecheckout = new checkoutDataTable();
208             
base.Tables.Add(this.tablecheckout);
209         }
210         
211         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
212         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
213         
private bool ShouldSerializecheckout() {
214             
return false;
215         }
216         
217         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
218         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
219         
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
220             
if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
221                 
this.InitVars();
222             }
223         }
224         
225         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
226         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
227         
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
228             hospitalDataSet3 ds =
new hospitalDataSet3();
229             
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
230             
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
231             
global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
232             any.Namespace = ds.Namespace;
233             sequence.Items.Add(any);
234             type.Particle = sequence;
235             
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
236             
if (xs.Contains(dsSchema.TargetNamespace)) {
237                 
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
238                 
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
239                 
try {
240                     
global::System.Xml.Schema.XmlSchema schema = null;
241                     dsSchema.Write(s1);
242                     
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
243                         schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
244                         s2.SetLength(
0);
245                         schema.Write(s2);
246                         
if ((s1.Length == s2.Length)) {
247                             s1.Position =
0;
248                             s2.Position =
0;
249                             
for (; ((s1.Position != s1.Length)
250                                         && (s1.ReadByte() == s2.ReadByte())); ) {
251                                 ;
252                             }
253                             
if ((s1.Position == s1.Length)) {
254                                 
return type;
255                             }
256                         }
257                     }
258                 }
259                 
finally {
260                     
if ((s1 != null)) {
261                         s1.Close();
262                     }
263                     
if ((s2 != null)) {
264                         s2.Close();
265                     }
266                 }
267             }
268             xs.Add(dsSchema);
269             
return type;
270         }
271         
272         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
273         
public delegate void checkoutRowChangeEventHandler(object sender, checkoutRowChangeEvent e);
274         
275         ///
<summary>
276         ///
Represents the strongly named DataTable class.
277         ///</summary>

278         
[global::System.Serializable()]
279         
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
280         
public partial class checkoutDataTable : global::System.Data.TypedTableBase<checkoutRow> {
281             
282             
private global::System.Data.DataColumn columnId;
283             
284             
private global::System.Data.DataColumn columnname;
285             
286             
private global::System.Data.DataColumn columngen;
287             
288             
private global::System.Data.DataColumn columnage;
289             
290             
private global::System.Data.DataColumn columncontact;
291             
292             
private global::System.Data.DataColumn columnaddr;
293             
294             
private global::System.Data.DataColumn columndisease;
295             
296             
private global::System.Data.DataColumn columndate_in;
297             
298             
private global::System.Data.DataColumn columndate_out;
299             
300             
private global::System.Data.DataColumn columnbuild;
301             
302             
private global::System.Data.DataColumn columnr_no;
303             
304             
private global::System.Data.DataColumn columnr_type;
305             
306             
private global::System.Data.DataColumn columnstatus;
307             
308             
private global::System.Data.DataColumn columnmed_price;
309             
310             
private global::System.Data.DataColumn columntotal;
311             
312             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
313             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
314             
public checkoutDataTable() {
315                 
this.TableName = "checkout";
316                 
this.BeginInit();
317                 
this.InitClass();
318                 
this.EndInit();
319             }
320             
321             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
322             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
323             
internal checkoutDataTable(global::System.Data.DataTable table) {
324                 
this.TableName = table.TableName;
325                 
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
326                     
this.CaseSensitive = table.CaseSensitive;
327                 }
328                 
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
329                     
this.Locale = table.Locale;
330                 }
331                 
if ((table.Namespace != table.DataSet.Namespace)) {
332                     
this.Namespace = table.Namespace;
333                 }
334                 
this.Prefix = table.Prefix;
335                 
this.MinimumCapacity = table.MinimumCapacity;
336             }
337             
338             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
339             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
340             
protected checkoutDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
341                     
base(info, context) {
342                 
this.InitVars();
343             }
344             
345             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
346             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
347             
public global::System.Data.DataColumn IdColumn {
348                 
get {
349                     
return this.columnId;
350                 }
351             }
352             
353             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
354             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
355             
public global::System.Data.DataColumn nameColumn {
356                 
get {
357                     
return this.columnname;
358                 }
359             }
360             
361             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
362             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
363             
public global::System.Data.DataColumn genColumn {
364                 
get {
365                     
return this.columngen;
366                 }
367             }
368             
369             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
370             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
371             
public global::System.Data.DataColumn ageColumn {
372                 
get {
373                     
return this.columnage;
374                 }
375             }
376             
377             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
378             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
379             
public global::System.Data.DataColumn contactColumn {
380                 
get {
381                     
return this.columncontact;
382                 }
383             }
384             
385             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
386             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
387             
public global::System.Data.DataColumn addrColumn {
388                 
get {
389                     
return this.columnaddr;
390                 }
391             }
392             
393             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
394             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
395             
public global::System.Data.DataColumn diseaseColumn {
396                 
get {
397                     
return this.columndisease;
398                 }
399             }
400             
401             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
402             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
403             
public global::System.Data.DataColumn date_inColumn {
404                 
get {
405                     
return this.columndate_in;
406                 }
407             }
408             
409             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
410             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
411             
public global::System.Data.DataColumn date_outColumn {
412                 
get {
413                     
return this.columndate_out;
414                 }
415             }
416             
417             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
418             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
419             
public global::System.Data.DataColumn buildColumn {
420                 
get {
421                     
return this.columnbuild;
422                 }
423             }
424             
425             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
426             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
427             
public global::System.Data.DataColumn r_noColumn {
428                 
get {
429                     
return this.columnr_no;
430                 }
431             }
432             
433             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
434             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
435             
public global::System.Data.DataColumn r_typeColumn {
436                 
get {
437                     
return this.columnr_type;
438                 }
439             }
440             
441             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
442             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
443             
public global::System.Data.DataColumn statusColumn {
444                 
get {
445                     
return this.columnstatus;
446                 }
447             }
448             
449             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
450             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
451             
public global::System.Data.DataColumn med_priceColumn {
452                 
get {
453                     
return this.columnmed_price;
454                 }
455             }
456             
457             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
458             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
459             
public global::System.Data.DataColumn totalColumn {
460                 
get {
461                     
return this.columntotal;
462                 }
463             }
464             
465             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
466             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
467             
[global::System.ComponentModel.Browsable(false)]
468             
public int Count {
469                 
get {
470                     
return this.Rows.Count;
471                 }
472             }
473             
474             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
475             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
476             
public checkoutRow this[int index] {
477                 
get {
478                     
return ((checkoutRow)(this.Rows[index]));
479                 }
480             }
481             
482             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
483             
public event checkoutRowChangeEventHandler checkoutRowChanging;
484             
485             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
486             
public event checkoutRowChangeEventHandler checkoutRowChanged;
487             
488             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
489             
public event checkoutRowChangeEventHandler checkoutRowDeleting;
490             
491             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
492             
public event checkoutRowChangeEventHandler checkoutRowDeleted;
493             
494             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
495             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
496             
public void AddcheckoutRow(checkoutRow row) {
497                 
this.Rows.Add(row);
498             }
499             
500             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
501             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
502             
public checkoutRow AddcheckoutRow(string name, string gen, string age, string contact, string addr, string disease, string date_in, string date_out, string build, string r_no, string r_type, string status, string med_price, string total) {
503                 checkoutRow rowcheckoutRow = ((checkoutRow)(
this.NewRow()));
504                 
object[] columnValuesArray = new object[] {
505                         
null,
506                         name,
507                         gen,
508                         age,
509                         contact,
510                         addr,
511                         disease,
512                         date_in,
513                         date_out,
514                         build,
515                         r_no,
516                         r_type,
517                         status,
518                         med_price,
519                         total};
520                 rowcheckoutRow.ItemArray = columnValuesArray;
521                 
this.Rows.Add(rowcheckoutRow);
522                 
return rowcheckoutRow;
523             }
524             
525             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
526             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
527             
public checkoutRow FindById(int Id) {
528                 
return ((checkoutRow)(this.Rows.Find(new object[] {
529                             Id})));
530             }
531             
532             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
533             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
534             
public override global::System.Data.DataTable Clone() {
535                 checkoutDataTable cln = ((checkoutDataTable)(
base.Clone()));
536                 cln.InitVars();
537                 
return cln;
538             }
539             
540             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
541             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
542             
protected override global::System.Data.DataTable CreateInstance() {
543                 
return new checkoutDataTable();
544             }
545             
546             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
547             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
548             
internal void InitVars() {
549                 
this.columnId = base.Columns["Id"];
550                 
this.columnname = base.Columns["name"];
551                 
this.columngen = base.Columns["gen"];
552                 
this.columnage = base.Columns["age"];
553                 
this.columncontact = base.Columns["contact"];
554                 
this.columnaddr = base.Columns["addr"];
555                 
this.columndisease = base.Columns["disease"];
556                 
this.columndate_in = base.Columns["date_in"];
557                 
this.columndate_out = base.Columns["date_out"];
558                 
this.columnbuild = base.Columns["build"];
559                 
this.columnr_no = base.Columns["r_no"];
560                 
this.columnr_type = base.Columns["r_type"];
561                 
this.columnstatus = base.Columns["status"];
562                 
this.columnmed_price = base.Columns["med_price"];
563                 
this.columntotal = base.Columns["total"];
564             }
565             
566             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
567             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
568             
private void InitClass() {
569                 
this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element);
570                 
base.Columns.Add(this.columnId);
571                 
this.columnname = new global::System.Data.DataColumn("name", typeof(string), null, global::System.Data.MappingType.Element);
572                 
base.Columns.Add(this.columnname);
573                 
this.columngen = new global::System.Data.DataColumn("gen", typeof(string), null, global::System.Data.MappingType.Element);
574                 
base.Columns.Add(this.columngen);
575                 
this.columnage = new global::System.Data.DataColumn("age", typeof(string), null, global::System.Data.MappingType.Element);
576                 
base.Columns.Add(this.columnage);
577                 
this.columncontact = new global::System.Data.DataColumn("contact", typeof(string), null, global::System.Data.MappingType.Element);
578                 
base.Columns.Add(this.columncontact);
579                 
this.columnaddr = new global::System.Data.DataColumn("addr", typeof(string), null, global::System.Data.MappingType.Element);
580                 
base.Columns.Add(this.columnaddr);
581                 
this.columndisease = new global::System.Data.DataColumn("disease", typeof(string), null, global::System.Data.MappingType.Element);
582                 
base.Columns.Add(this.columndisease);
583                 
this.columndate_in = new global::System.Data.DataColumn("date_in", typeof(string), null, global::System.Data.MappingType.Element);
584                 
base.Columns.Add(this.columndate_in);
585                 
this.columndate_out = new global::System.Data.DataColumn("date_out", typeof(string), null, global::System.Data.MappingType.Element);
586                 
base.Columns.Add(this.columndate_out);
587                 
this.columnbuild = new global::System.Data.DataColumn("build", typeof(string), null, global::System.Data.MappingType.Element);
588                 
base.Columns.Add(this.columnbuild);
589                 
this.columnr_no = new global::System.Data.DataColumn("r_no", typeof(string), null, global::System.Data.MappingType.Element);
590                 
base.Columns.Add(this.columnr_no);
591                 
this.columnr_type = new global::System.Data.DataColumn("r_type", typeof(string), null, global::System.Data.MappingType.Element);
592                 
base.Columns.Add(this.columnr_type);
593                 
this.columnstatus = new global::System.Data.DataColumn("status", typeof(string), null, global::System.Data.MappingType.Element);
594                 
base.Columns.Add(this.columnstatus);
595                 
this.columnmed_price = new global::System.Data.DataColumn("med_price", typeof(string), null, global::System.Data.MappingType.Element);
596                 
base.Columns.Add(this.columnmed_price);
597                 
this.columntotal = new global::System.Data.DataColumn("total", typeof(string), null, global::System.Data.MappingType.Element);
598                 
base.Columns.Add(this.columntotal);
599                 
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
600                                 
this.columnId}, true));
601                 
this.columnId.AutoIncrement = true;
602                 
this.columnId.AutoIncrementSeed = -1;
603                 
this.columnId.AutoIncrementStep = -1;
604                 
this.columnId.AllowDBNull = false;
605                 
this.columnId.ReadOnly = true;
606                 
this.columnId.Unique = true;
607                 
this.columnname.MaxLength = 50;
608                 
this.columngen.MaxLength = 50;
609                 
this.columnage.MaxLength = 50;
610                 
this.columncontact.MaxLength = 50;
611                 
this.columnaddr.MaxLength = 50;
612                 
this.columndisease.MaxLength = 50;
613                 
this.columndate_in.MaxLength = 50;
614                 
this.columndate_out.MaxLength = 50;
615                 
this.columnbuild.MaxLength = 50;
616                 
this.columnr_no.MaxLength = 50;
617                 
this.columnr_type.MaxLength = 50;
618                 
this.columnstatus.MaxLength = 50;
619                 
this.columnmed_price.MaxLength = 50;
620                 
this.columntotal.MaxLength = 50;
621             }
622             
623             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
624             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
625             
public checkoutRow NewcheckoutRow() {
626                 
return ((checkoutRow)(this.NewRow()));
627             }
628             
629             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
630             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
631             
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
632                 
return new checkoutRow(builder);
633             }
634             
635             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
636             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
637             
protected override global::System.Type GetRowType() {
638                 
return typeof(checkoutRow);
639             }
640             
641             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
642             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
643             
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
644                 
base.OnRowChanged(e);
645                 
if ((this.checkoutRowChanged != null)) {
646                     
this.checkoutRowChanged(this, new checkoutRowChangeEvent(((checkoutRow)(e.Row)), e.Action));
647                 }
648             }
649             
650             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
651             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
652             
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
653                 
base.OnRowChanging(e);
654                 
if ((this.checkoutRowChanging != null)) {
655                     
this.checkoutRowChanging(this, new checkoutRowChangeEvent(((checkoutRow)(e.Row)), e.Action));
656                 }
657             }
658             
659             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
660             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
661             
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
662                 
base.OnRowDeleted(e);
663                 
if ((this.checkoutRowDeleted != null)) {
664                     
this.checkoutRowDeleted(this, new checkoutRowChangeEvent(((checkoutRow)(e.Row)), e.Action));
665                 }
666             }
667             
668             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
669             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
670             
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
671                 
base.OnRowDeleting(e);
672                 
if ((this.checkoutRowDeleting != null)) {
673                     
this.checkoutRowDeleting(this, new checkoutRowChangeEvent(((checkoutRow)(e.Row)), e.Action));
674                 }
675             }
676             
677             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
678             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
679             
public void RemovecheckoutRow(checkoutRow row) {
680                 
this.Rows.Remove(row);
681             }
682             
683             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
684             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
685             
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
686                 
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
687                 
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
688                 hospitalDataSet3 ds =
new hospitalDataSet3();
689                 
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
690                 any1.Namespace =
"http://www.w3.org/2001/XMLSchema";
691                 any1.MinOccurs =
new decimal(0);
692                 any1.MaxOccurs =
decimal.MaxValue;
693                 any1.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
694                 sequence.Items.Add(any1);
695                 
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
696                 any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1";
697                 any2.MinOccurs =
new decimal(1);
698                 any2.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
699                 sequence.Items.Add(any2);
700                 
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
701                 attribute1.Name =
"namespace";
702                 attribute1.FixedValue = ds.Namespace;
703                 type.Attributes.Add(attribute1);
704                 
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
705                 attribute2.Name =
"tableTypeName";
706                 attribute2.FixedValue =
"checkoutDataTable";
707                 type.Attributes.Add(attribute2);
708                 type.Particle = sequence;
709                 
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
710                 
if (xs.Contains(dsSchema.TargetNamespace)) {
711                     
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
712                     
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
713                     
try {
714                         
global::System.Xml.Schema.XmlSchema schema = null;
715                         dsSchema.Write(s1);
716                         
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
717                             schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
718                             s2.SetLength(
0);
719                             schema.Write(s2);
720                             
if ((s1.Length == s2.Length)) {
721                                 s1.Position =
0;
722                                 s2.Position =
0;
723                                 
for (; ((s1.Position != s1.Length)
724                                             && (s1.ReadByte() == s2.ReadByte())); ) {
725                                     ;
726                                 }
727                                 
if ((s1.Position == s1.Length)) {
728                                     
return type;
729                                 }
730                             }
731                         }
732                     }
733                     
finally {
734                         
if ((s1 != null)) {
735                             s1.Close();
736                         }
737                         
if ((s2 != null)) {
738                             s2.Close();
739                         }
740                     }
741                 }
742                 xs.Add(dsSchema);
743                 
return type;
744             }
745         }

746         
747         ///
<summary>
748         ///
Represents strongly named DataRow class.
749         ///</summary>

750         
public partial class checkoutRow : global::System.Data.DataRow {
751             
752             
private checkoutDataTable tablecheckout;
753             
754             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
755             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
756             
internal checkoutRow(global::System.Data.DataRowBuilder rb) :
757                     
base(rb) {
758                 
this.tablecheckout = ((checkoutDataTable)(this.Table));
759             }
760             
761             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
762             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
763             
public int Id {
764                 
get {
765                     
return ((int)(this[this.tablecheckout.IdColumn]));
766                 }
767                 
set {
768                     
this[this.tablecheckout.IdColumn] = value;
769                 }
770             }
771             
772             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
773             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
774             
public string name {
775                 
get {
776                     
try {
777                         
return ((string)(this[this.tablecheckout.nameColumn]));
778                     }
779                     
catch (global::System.InvalidCastException e) {
780                         
throw new global::System.Data.StrongTypingException("The value for column \'name\' in table \'checkout\' is DBNull.", e);
781                     }
782                 }
783                 
set {
784                     
this[this.tablecheckout.nameColumn] = value;
785                 }
786             }
787             
788             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
789             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
790             
public string gen {
791                 
get {
792                     
try {
793                         
return ((string)(this[this.tablecheckout.genColumn]));
794                     }
795                     
catch (global::System.InvalidCastException e) {
796                         
throw new global::System.Data.StrongTypingException("The value for column \'gen\' in table \'checkout\' is DBNull.", e);
797                     }
798                 }
799                 
set {
800                     
this[this.tablecheckout.genColumn] = value;
801                 }
802             }
803             
804             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
805             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
806             
public string age {
807                 
get {
808                     
try {
809                         
return ((string)(this[this.tablecheckout.ageColumn]));
810                     }
811                     
catch (global::System.InvalidCastException e) {
812                         
throw new global::System.Data.StrongTypingException("The value for column \'age\' in table \'checkout\' is DBNull.", e);
813                     }
814                 }
815                 
set {
816                     
this[this.tablecheckout.ageColumn] = value;
817                 }
818             }
819             
820             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
821             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
822             
public string contact {
823                 
get {
824                     
try {
825                         
return ((string)(this[this.tablecheckout.contactColumn]));
826                     }
827                     
catch (global::System.InvalidCastException e) {
828                         
throw new global::System.Data.StrongTypingException("The value for column \'contact\' in table \'checkout\' is DBNull.", e);
829                     }
830                 }
831                 
set {
832                     
this[this.tablecheckout.contactColumn] = value;
833                 }
834             }
835             
836             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
837             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
838             
public string addr {
839                 
get {
840                     
try {
841                         
return ((string)(this[this.tablecheckout.addrColumn]));
842                     }
843                     
catch (global::System.InvalidCastException e) {
844                         
throw new global::System.Data.StrongTypingException("The value for column \'addr\' in table \'checkout\' is DBNull.", e);
845                     }
846                 }
847                 
set {
848                     
this[this.tablecheckout.addrColumn] = value;
849                 }
850             }
851             
852             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
853             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
854             
public string disease {
855                 
get {
856                     
try {
857                         
return ((string)(this[this.tablecheckout.diseaseColumn]));
858                     }
859                     
catch (global::System.InvalidCastException e) {
860                         
throw new global::System.Data.StrongTypingException("The value for column \'disease\' in table \'checkout\' is DBNull.", e);
861                     }
862                 }
863                 
set {
864                     
this[this.tablecheckout.diseaseColumn] = value;
865                 }
866             }
867             
868             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
869             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
870             
public string date_in {
871                 
get {
872                     
try {
873                         
return ((string)(this[this.tablecheckout.date_inColumn]));
874                     }
875                     
catch (global::System.InvalidCastException e) {
876                         
throw new global::System.Data.StrongTypingException("The value for column \'date_in\' in table \'checkout\' is DBNull.", e);
877                     }
878                 }
879                 
set {
880                     
this[this.tablecheckout.date_inColumn] = value;
881                 }
882             }
883             
884             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
885             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
886             
public string date_out {
887                 
get {
888                     
try {
889                         
return ((string)(this[this.tablecheckout.date_outColumn]));
890                     }
891                     
catch (global::System.InvalidCastException e) {
892                         
throw new global::System.Data.StrongTypingException("The value for column \'date_out\' in table \'checkout\' is DBNull.", e);
893                     }
894                 }
895                 
set {
896                     
this[this.tablecheckout.date_outColumn] = value;
897                 }
898             }
899             
900             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
901             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
902             
public string build {
903                 
get {
904                     
try {
905                         
return ((string)(this[this.tablecheckout.buildColumn]));
906                     }
907                     
catch (global::System.InvalidCastException e) {
908                         
throw new global::System.Data.StrongTypingException("The value for column \'build\' in table \'checkout\' is DBNull.", e);
909                     }
910                 }
911                 
set {
912                     
this[this.tablecheckout.buildColumn] = value;
913                 }
914             }
915             
916             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
917             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
918             
public string r_no {
919                 
get {
920                     
try {
921                         
return ((string)(this[this.tablecheckout.r_noColumn]));
922                     }
923                     
catch (global::System.InvalidCastException e) {
924                         
throw new global::System.Data.StrongTypingException("The value for column \'r_no\' in table \'checkout\' is DBNull.", e);
925                     }
926                 }
927                 
set {
928                     
this[this.tablecheckout.r_noColumn] = value;
929                 }
930             }
931             
932             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
933             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
934             
public string r_type {
935                 
get {
936                     
try {
937                         
return ((string)(this[this.tablecheckout.r_typeColumn]));
938                     }
939                     
catch (global::System.InvalidCastException e) {
940                         
throw new global::System.Data.StrongTypingException("The value for column \'r_type\' in table \'checkout\' is DBNull.", e);
941                     }
942                 }
943                 
set {
944                     
this[this.tablecheckout.r_typeColumn] = value;
945                 }
946             }
947             
948             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
949             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
950             
public string status {
951                 
get {
952                     
try {
953                         
return ((string)(this[this.tablecheckout.statusColumn]));
954                     }
955                     
catch (global::System.InvalidCastException e) {
956                         
throw new global::System.Data.StrongTypingException("The value for column \'status\' in table \'checkout\' is DBNull.", e);
957                     }
958                 }
959                 
set {
960                     
this[this.tablecheckout.statusColumn] = value;
961                 }
962             }
963             
964             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
965             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
966             
public string med_price {
967                 
get {
968                     
try {
969                         
return ((string)(this[this.tablecheckout.med_priceColumn]));
970                     }
971                     
catch (global::System.InvalidCastException e) {
972                         
throw new global::System.Data.StrongTypingException("The value for column \'med_price\' in table \'checkout\' is DBNull.", e);
973                     }
974                 }
975                 
set {
976                     
this[this.tablecheckout.med_priceColumn] = value;
977                 }
978             }
979             
980             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
981             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
982             
public string total {
983                 
get {
984                     
try {
985                         
return ((string)(this[this.tablecheckout.totalColumn]));
986                     }
987                     
catch (global::System.InvalidCastException e) {
988                         
throw new global::System.Data.StrongTypingException("The value for column \'total\' in table \'checkout\' is DBNull.", e);
989                     }
990                 }
991                 
set {
992                     
this[this.tablecheckout.totalColumn] = value;
993                 }
994             }
995             
996             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
997             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
998             
public bool IsnameNull() {
999                 
return this.IsNull(this.tablecheckout.nameColumn);
1000             }
1001             
1002             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1003             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1004             
public void SetnameNull() {
1005                 
this[this.tablecheckout.nameColumn] = global::System.Convert.DBNull;
1006             }
1007             
1008             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1009             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1010             
public bool IsgenNull() {
1011                 
return this.IsNull(this.tablecheckout.genColumn);
1012             }
1013             
1014             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1015             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1016             
public void SetgenNull() {
1017                 
this[this.tablecheckout.genColumn] = global::System.Convert.DBNull;
1018             }
1019             
1020             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1021             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1022             
public bool IsageNull() {
1023                 
return this.IsNull(this.tablecheckout.ageColumn);
1024             }
1025             
1026             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1027             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1028             
public void SetageNull() {
1029                 
this[this.tablecheckout.ageColumn] = global::System.Convert.DBNull;
1030             }
1031             
1032             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1033             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1034             
public bool IscontactNull() {
1035                 
return this.IsNull(this.tablecheckout.contactColumn);
1036             }
1037             
1038             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1039             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1040             
public void SetcontactNull() {
1041                 
this[this.tablecheckout.contactColumn] = global::System.Convert.DBNull;
1042             }
1043             
1044             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1045             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1046             
public bool IsaddrNull() {
1047                 
return this.IsNull(this.tablecheckout.addrColumn);
1048             }
1049             
1050             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1051             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1052             
public void SetaddrNull() {
1053                 
this[this.tablecheckout.addrColumn] = global::System.Convert.DBNull;
1054             }
1055             
1056             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1057             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1058             
public bool IsdiseaseNull() {
1059                 
return this.IsNull(this.tablecheckout.diseaseColumn);
1060             }
1061             
1062             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1063             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1064             
public void SetdiseaseNull() {
1065                 
this[this.tablecheckout.diseaseColumn] = global::System.Convert.DBNull;
1066             }
1067             
1068             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1069             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1070             
public bool Isdate_inNull() {
1071                 
return this.IsNull(this.tablecheckout.date_inColumn);
1072             }
1073             
1074             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1075             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1076             
public void Setdate_inNull() {
1077                 
this[this.tablecheckout.date_inColumn] = global::System.Convert.DBNull;
1078             }
1079             
1080             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1081             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1082             
public bool Isdate_outNull() {
1083                 
return this.IsNull(this.tablecheckout.date_outColumn);
1084             }
1085             
1086             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1087             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1088             
public void Setdate_outNull() {
1089                 
this[this.tablecheckout.date_outColumn] = global::System.Convert.DBNull;
1090             }
1091             
1092             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1093             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1094             
public bool IsbuildNull() {
1095                 
return this.IsNull(this.tablecheckout.buildColumn);
1096             }
1097             
1098             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1099             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1100             
public void SetbuildNull() {
1101                 
this[this.tablecheckout.buildColumn] = global::System.Convert.DBNull;
1102             }
1103             
1104             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1105             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1106             
public bool Isr_noNull() {
1107                 
return this.IsNull(this.tablecheckout.r_noColumn);
1108             }
1109             
1110             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1111             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1112             
public void Setr_noNull() {
1113                 
this[this.tablecheckout.r_noColumn] = global::System.Convert.DBNull;
1114             }
1115             
1116             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1117             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1118             
public bool Isr_typeNull() {
1119                 
return this.IsNull(this.tablecheckout.r_typeColumn);
1120             }
1121             
1122             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1123             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1124             
public void Setr_typeNull() {
1125                 
this[this.tablecheckout.r_typeColumn] = global::System.Convert.DBNull;
1126             }
1127             
1128             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1129             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1130             
public bool IsstatusNull() {
1131                 
return this.IsNull(this.tablecheckout.statusColumn);
1132             }
1133             
1134             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1135             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1136             
public void SetstatusNull() {
1137                 
this[this.tablecheckout.statusColumn] = global::System.Convert.DBNull;
1138             }
1139             
1140             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1141             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1142             
public bool Ismed_priceNull() {
1143                 
return this.IsNull(this.tablecheckout.med_priceColumn);
1144             }
1145             
1146             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1147             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1148             
public void Setmed_priceNull() {
1149                 
this[this.tablecheckout.med_priceColumn] = global::System.Convert.DBNull;
1150             }
1151             
1152             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1153             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1154             
public bool IstotalNull() {
1155                 
return this.IsNull(this.tablecheckout.totalColumn);
1156             }
1157             
1158             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1159             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1160             
public void SettotalNull() {
1161                 
this[this.tablecheckout.totalColumn] = global::System.Convert.DBNull;
1162             }
1163         }

1164         
1165         ///
<summary>
1166         ///
Row event argument class
1167         ///</summary>

1168         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1169         
public class checkoutRowChangeEvent : global::System.EventArgs {
1170             
1171             
private checkoutRow eventRow;
1172             
1173             
private global::System.Data.DataRowAction eventAction;
1174             
1175             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1176             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1177             
public checkoutRowChangeEvent(checkoutRow row, global::System.Data.DataRowAction action) {
1178                 
this.eventRow = row;
1179                 
this.eventAction = action;
1180             }
1181             
1182             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1183             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1184             
public checkoutRow Row {
1185                 
get {
1186                     
return this.eventRow;
1187                 }
1188             }
1189             
1190             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1191             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1192             
public global::System.Data.DataRowAction Action {
1193                 
get {
1194                     
return this.eventAction;
1195                 }
1196             }
1197         }
1198     }
1199 }

1200 namespace
HospitalManagementSystemCSharp.hospitalDataSet3TableAdapters {
1201     
1202     
1203     ///
<summary>
1204     ///
Represents the connection and commands used to retrieve and save data.
1205     ///</summary>

1206     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
1207     
[global::System.ComponentModel.ToolboxItem(true)]
1208     
[global::System.ComponentModel.DataObjectAttribute(true)]
1209     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
1210         
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1211     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1212     
public partial class checkoutTableAdapter : global::System.ComponentModel.Component {
1213         
1214         
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
1215         
1216         
private global::System.Data.SqlClient.SqlConnection _connection;
1217         
1218         
private global::System.Data.SqlClient.SqlTransaction _transaction;
1219         
1220         
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
1221         
1222         
private bool _clearBeforeFill;
1223         
1224         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1225         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1226         
public checkoutTableAdapter() {
1227             
this.ClearBeforeFill = true;
1228         }
1229         
1230         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1231         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1232         
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
1233             
get {
1234                 
if ((this._adapter == null)) {
1235                     
this.InitAdapter();
1236                 }
1237                 
return this._adapter;
1238             }
1239         }
1240         
1241         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1242         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1243         
internal global::System.Data.SqlClient.SqlConnection Connection {
1244             
get {
1245                 
if ((this._connection == null)) {
1246                     
this.InitConnection();
1247                 }
1248                 
return this._connection;
1249             }
1250             
set {
1251                 
this._connection = value;
1252                 
if ((this.Adapter.InsertCommand != null)) {
1253                     
this.Adapter.InsertCommand.Connection = value;
1254                 }
1255                 
if ((this.Adapter.DeleteCommand != null)) {
1256                     
this.Adapter.DeleteCommand.Connection = value;
1257                 }
1258                 
if ((this.Adapter.UpdateCommand != null)) {
1259                     
this.Adapter.UpdateCommand.Connection = value;
1260                 }
1261                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1262                     
if ((this.CommandCollection[i] != null)) {
1263                         ((
global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
1264                     }
1265                 }
1266             }
1267         }
1268         
1269         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1270         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1271         
internal global::System.Data.SqlClient.SqlTransaction Transaction {
1272             
get {
1273                 
return this._transaction;
1274             }
1275             
set {
1276                 
this._transaction = value;
1277                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1278                     
this.CommandCollection[i].Transaction = this._transaction;
1279                 }
1280                 
if (((this.Adapter != null)
1281                             && (
this.Adapter.DeleteCommand != null))) {
1282                     
this.Adapter.DeleteCommand.Transaction = this._transaction;
1283                 }
1284                 
if (((this.Adapter != null)
1285                             && (
this.Adapter.InsertCommand != null))) {
1286                     
this.Adapter.InsertCommand.Transaction = this._transaction;
1287                 }
1288                 
if (((this.Adapter != null)
1289                             && (
this.Adapter.UpdateCommand != null))) {
1290                     
this.Adapter.UpdateCommand.Transaction = this._transaction;
1291                 }
1292             }
1293         }
1294         
1295         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1296         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1297         
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
1298             
get {
1299                 
if ((this._commandCollection == null)) {
1300                     
this.InitCommandCollection();
1301                 }
1302                 
return this._commandCollection;
1303             }
1304         }
1305         
1306         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1307         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1308         
public bool ClearBeforeFill {
1309             
get {
1310                 
return this._clearBeforeFill;
1311             }
1312             
set {
1313                 
this._clearBeforeFill = value;
1314             }
1315         }
1316         
1317         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1318         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1319         
private void InitAdapter() {
1320             
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
1321             
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
1322             tableMapping.SourceTable =
"Table";
1323             tableMapping.DataSetTable =
"checkout";
1324             tableMapping.ColumnMappings.Add(
"Id", "Id");
1325             tableMapping.ColumnMappings.Add(
"name", "name");
1326             tableMapping.ColumnMappings.Add(
"gen", "gen");
1327             tableMapping.ColumnMappings.Add(
"age", "age");
1328             tableMapping.ColumnMappings.Add(
"contact", "contact");
1329             tableMapping.ColumnMappings.Add(
"addr", "addr");
1330             tableMapping.ColumnMappings.Add(
"disease", "disease");
1331             tableMapping.ColumnMappings.Add(
"date_in", "date_in");
1332             tableMapping.ColumnMappings.Add(
"date_out", "date_out");
1333             tableMapping.ColumnMappings.Add(
"build", "build");
1334             tableMapping.ColumnMappings.Add(
"r_no", "r_no");
1335             tableMapping.ColumnMappings.Add(
"r_type", "r_type");
1336             tableMapping.ColumnMappings.Add(
"status", "status");
1337             tableMapping.ColumnMappings.Add(
"med_price", "med_price");
1338             tableMapping.ColumnMappings.Add(
"total", "total");
1339             
this._adapter.TableMappings.Add(tableMapping);
1340             
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
1341             
this._adapter.DeleteCommand.Connection = this.Connection;
1342             
this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[checkout] WHERE (([Id] = @Original_Id) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_gen = 1 AND [gen] IS NULL) OR ([gen] = @Original_gen)) AND ((@IsNull_age = 1 AND [age] IS NULL) OR ([age] = @Original_age)) AND ((@IsNull_contact = 1 AND [contact] IS NULL) OR ([contact] = @Original_contact)) AND ((@IsNull_addr = 1 AND [addr] IS NULL) OR ([addr] = @Original_addr)) AND ((@IsNull_disease = 1 AND [disease] IS NULL) OR ([disease] = @Original_disease)) AND ((@IsNull_date_in = 1 AND [date_in] IS NULL) OR ([date_in] = @Original_date_in)) AND ((@IsNull_date_out = 1 AND [date_out] IS NULL) OR ([date_out] = @Original_date_out)) AND ((@IsNull_build = 1 AND [build] IS NULL) OR ([build] = @Original_build)) AND ((@IsNull_r_no = 1 AND [r_no] IS NULL) OR ([r_no] = @Original_r_no)) AND ((@IsNull_r_type = 1 AND [r_type] IS NULL) OR ([r_type] = @Original_r_type)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_med_price = 1 AND [med_price] IS NULL) OR ([med_price] = @Original_med_price)) AND ((@IsNull_total = 1 AND [total] IS NULL) OR ([total] = @Original_total)))";
1343             
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
1344             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1345             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1346             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1347             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_gen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1348             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_gen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1349             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_age", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "age", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1350             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_age", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "age", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1351             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_contact", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contact", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1352             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contact", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1353             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_addr", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1354             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1355             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_disease", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disease", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1356             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_disease", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disease", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1357             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_date_in", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_in", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1358             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_date_in", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_in", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1359             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_date_out", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_out", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1360             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_date_out", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_out", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1361             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_build", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "build", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1362             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_build", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "build", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1363             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_r_no", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_no", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1364             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_r_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_no", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1365             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_r_type", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_type", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1366             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_r_type", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_type", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1367             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "status", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1368             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_status", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "status", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1369             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_med_price", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "med_price", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1370             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_med_price", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "med_price", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1371             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_total", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1372             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1373             
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
1374             
this._adapter.InsertCommand.Connection = this.Connection;
1375             
this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[checkout] ([name], [gen], [age], [contact], [addr], [disease], [date_in], [date_out], [build], [r_no], [r_type], [status], [med_price], [total]) VALUES (@name, @gen, @age, @contact, @addr, @disease, @date_in, @date_out, @build, @r_no, @r_type, @status, @med_price, @total);
1376 SELECT Id, name, gen, age, contact, addr, disease, date_in, date_out, build, r_no, r_type, status, med_price, total FROM checkout WHERE (Id = SCOPE_IDENTITY())"
;
1377             
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
1378             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1379             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1380             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@age", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "age", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1381             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contact", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1382             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1383             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@disease", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disease", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1384             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@date_in", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_in", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1385             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@date_out", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_out", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1386             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@build", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "build", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1387             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@r_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_no", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1388             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@r_type", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_type", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1389             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@status", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "status", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1390             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@med_price", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "med_price", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1391             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1392             
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
1393             
this._adapter.UpdateCommand.Connection = this.Connection;
1394             
this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[checkout] SET [name] = @name, [gen] = @gen, [age] = @age, [contact]" +
1395                 
" = @contact, [addr] = @addr, [disease] = @disease, [date_in] = @date_in, [date_o" +
1396                 
"ut] = @date_out, [build] = @build, [r_no] = @r_no, [r_type] = @r_type, [status] " +
1397                 
"= @status, [med_price] = @med_price, [total] = @total WHERE (([Id] = @Original_I" +
1398                 
"d) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND " +
1399                 
"((@IsNull_gen = 1 AND [gen] IS NULL) OR ([gen] = @Original_gen)) AND ((@IsNull_a" +
1400                 
"ge = 1 AND [age] IS NULL) OR ([age] = @Original_age)) AND ((@IsNull_contact = 1 " +
1401                 
"AND [contact] IS NULL) OR ([contact] = @Original_contact)) AND ((@IsNull_addr = " +
1402                 
"1 AND [addr] IS NULL) OR ([addr] = @Original_addr)) AND ((@IsNull_disease = 1 AN" +
1403                 
"D [disease] IS NULL) OR ([disease] = @Original_disease)) AND ((@IsNull_date_in =" +
1404                 
" 1 AND [date_in] IS NULL) OR ([date_in] = @Original_date_in)) AND ((@IsNull_date" +
1405                 
"_out = 1 AND [date_out] IS NULL) OR ([date_out] = @Original_date_out)) AND ((@Is" +
1406                 
"Null_build = 1 AND [build] IS NULL) OR ([build] = @Original_build)) AND ((@IsNul" +
1407                 
"l_r_no = 1 AND [r_no] IS NULL) OR ([r_no] = @Original_r_no)) AND ((@IsNull_r_typ" +
1408                 
"e = 1 AND [r_type] IS NULL) OR ([r_type] = @Original_r_type)) AND ((@IsNull_stat" +
1409                 
"us = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_med" +
1410                 
"_price = 1 AND [med_price] IS NULL) OR ([med_price] = @Original_med_price)) AND " +
1411                 
"((@IsNull_total = 1 AND [total] IS NULL) OR ([total] = @Original_total)));\r\nSELE" +
1412                 
"CT Id, name, gen, age, contact, addr, disease, date_in, date_out, build, r_no, r" +
1413                 
"_type, status, med_price, total FROM checkout WHERE (Id = @Id)";
1414             
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
1415             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1416             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gen", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1417             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@age", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "age", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1418             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contact", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1419             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1420             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@disease", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disease", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1421             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@date_in", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_in", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1422             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@date_out", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_out", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1423             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@build", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "build", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1424             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@r_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_no", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1425             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@r_type", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_type", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1426             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@status", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "status", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1427             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@med_price", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "med_price", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1428             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1429             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1430             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1431             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1432             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_gen", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gen", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1433             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_gen", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gen", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1434             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_age", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "age", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1435             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_age", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "age", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1436             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_contact", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contact", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1437             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contact", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1438             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_addr", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1439             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1440             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_disease", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disease", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1441             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_disease", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disease", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1442             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_date_in", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_in", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1443             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_date_in", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_in", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1444             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_date_out", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_out", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1445             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_date_out", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "date_out", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1446             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_build", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "build", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1447             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_build", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "build", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1448             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_r_no", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_no", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1449             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_r_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_no", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1450             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_r_type", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_type", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1451             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_r_type", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "r_type", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1452             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "status", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1453             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_status", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "status", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1454             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_med_price", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "med_price", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1455             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_med_price", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "med_price", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1456             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_total", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1457             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1458             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1459         }
1460         
1461         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1462         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1463         
private void InitConnection() {
1464             
this._connection = new global::System.Data.SqlClient.SqlConnection();
1465             
this._connection.ConnectionString = global::HospitalManagementSystemCSharp.Properties.Settings.Default.hospitalConnectionString;
1466         }
1467         
1468         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1469         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1470         
private void InitCommandCollection() {
1471             
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
1472             
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
1473             
this._commandCollection[0].Connection = this.Connection;
1474             
this._commandCollection[0].CommandText = "SELECT Id, name, gen, age, contact, addr, disease, date_in, date_out, build, r_no" +
1475                 
", r_type, status, med_price, total FROM dbo.checkout";
1476             
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
1477         }
1478         
1479         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1480         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1481         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1482         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
1483         
public virtual int Fill(hospitalDataSet3.checkoutDataTable dataTable) {
1484             
this.Adapter.SelectCommand = this.CommandCollection[0];
1485             
if ((this.ClearBeforeFill == true)) {
1486                 dataTable.Clear();
1487             }
1488             
int returnValue = this.Adapter.Fill(dataTable);
1489             
return returnValue;
1490         }
1491         
1492         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1493         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1494         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1495         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
1496         
public virtual hospitalDataSet3.checkoutDataTable GetData() {
1497             
this.Adapter.SelectCommand = this.CommandCollection[0];
1498             hospitalDataSet3.checkoutDataTable dataTable =
new hospitalDataSet3.checkoutDataTable();
1499             
this.Adapter.Fill(dataTable);
1500             
return dataTable;
1501         }
1502         
1503         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1504         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1505         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1506         
public virtual int Update(hospitalDataSet3.checkoutDataTable dataTable) {
1507             
return this.Adapter.Update(dataTable);
1508         }
1509         
1510         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1511         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1512         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1513         
public virtual int Update(hospitalDataSet3 dataSet) {
1514             
return this.Adapter.Update(dataSet, "checkout");
1515         }
1516         
1517         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1518         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1519         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1520         
public virtual int Update(global::System.Data.DataRow dataRow) {
1521             
return this.Adapter.Update(new global::System.Data.DataRow[] {
1522                         dataRow});
1523         }
1524         
1525         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1526         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1527         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1528         
public virtual int Update(global::System.Data.DataRow[] dataRows) {
1529             
return this.Adapter.Update(dataRows);
1530         }
1531         
1532         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1533         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1534         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1535         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
1536         
public virtual int Delete(int Original_Id, string Original_name, string Original_gen, string Original_age, string Original_contact, string Original_addr, string Original_disease, string Original_date_in, string Original_date_out, string Original_build, string Original_r_no, string Original_r_type, string Original_status, string Original_med_price, string Original_total) {
1537             
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id));
1538             
if ((Original_name == null)) {
1539                 
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
1540                 
this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
1541             }
1542             
else {
1543                 
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
1544                 
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_name));
1545             }
1546             
if ((Original_gen == null)) {
1547                 
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
1548                 
this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
1549             }
1550             
else {
1551                 
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
1552                 
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_gen));
1553             }
1554             
if ((Original_age == null)) {
1555                 
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
1556                 
this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
1557             }
1558             
else {
1559                 
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
1560                 
this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_age));
1561             }
1562             
if ((Original_contact == null)) {
1563                 
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
1564                 
this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
1565             }
1566             
else {
1567                 
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
1568                 
this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_contact));
1569             }
1570             
if ((Original_addr == null)) {
1571                 
this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
1572                 
this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value;
1573             }
1574             
else {
1575                 
this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
1576                 
this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_addr));
1577             }
1578             
if ((Original_disease == null)) {
1579                 
this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
1580                 
this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value;
1581             }
1582             
else {
1583                 
this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
1584                 
this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_disease));
1585             }
1586             
if ((Original_date_in == null)) {
1587                 
this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
1588                 
this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value;
1589             }
1590             
else {
1591                 
this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
1592                 
this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_date_in));
1593             }
1594             
if ((Original_date_out == null)) {
1595                 
this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1));
1596                 
this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value;
1597             }
1598             
else {
1599                 
this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0));
1600                 
this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_date_out));
1601             }
1602             
if ((Original_build == null)) {
1603                 
this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1));
1604                 
this.Adapter.DeleteCommand.Parameters[18].Value = global::System.DBNull.Value;
1605             }
1606             
else {
1607                 
this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0));
1608                 
this.Adapter.DeleteCommand.Parameters[18].Value = ((string)(Original_build));
1609             }
1610             
if ((Original_r_no == null)) {
1611                 
this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(1));
1612                 
this.Adapter.DeleteCommand.Parameters[20].Value = global::System.DBNull.Value;
1613             }
1614             
else {
1615                 
this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(0));
1616                 
this.Adapter.DeleteCommand.Parameters[20].Value = ((string)(Original_r_no));
1617             }
1618             
if ((Original_r_type == null)) {
1619                 
this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(1));
1620                 
this.Adapter.DeleteCommand.Parameters[22].Value = global::System.DBNull.Value;
1621             }
1622             
else {
1623                 
this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(0));
1624                 
this.Adapter.DeleteCommand.Parameters[22].Value = ((string)(Original_r_type));
1625             }
1626             
if ((Original_status == null)) {
1627                 
this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(1));
1628                 
this.Adapter.DeleteCommand.Parameters[24].Value = global::System.DBNull.Value;
1629             }
1630             
else {
1631                 
this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(0));
1632                 
this.Adapter.DeleteCommand.Parameters[24].Value = ((string)(Original_status));
1633             }
1634             
if ((Original_med_price == null)) {
1635                 
this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(1));
1636                 
this.Adapter.DeleteCommand.Parameters[26].Value = global::System.DBNull.Value;
1637             }
1638             
else {
1639                 
this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(0));
1640                 
this.Adapter.DeleteCommand.Parameters[26].Value = ((string)(Original_med_price));
1641             }
1642             
if ((Original_total == null)) {
1643                 
this.Adapter.DeleteCommand.Parameters[27].Value = ((object)(1));
1644                 
this.Adapter.DeleteCommand.Parameters[28].Value = global::System.DBNull.Value;
1645             }
1646             
else {
1647                 
this.Adapter.DeleteCommand.Parameters[27].Value = ((object)(0));
1648                 
this.Adapter.DeleteCommand.Parameters[28].Value = ((string)(Original_total));
1649             }
1650             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1651             
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1652                         !=
global::System.Data.ConnectionState.Open)) {
1653                 
this.Adapter.DeleteCommand.Connection.Open();
1654             }
1655             
try {
1656                 
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1657                 
return returnValue;
1658             }
1659             
finally {
1660                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1661                     
this.Adapter.DeleteCommand.Connection.Close();
1662                 }
1663             }
1664         }
1665         
1666         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1667         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1668         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1669         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1670         
public virtual int Insert(string name, string gen, string age, string contact, string addr, string disease, string date_in, string date_out, string build, string r_no, string r_type, string status, string med_price, string total) {
1671             
if ((name == null)) {
1672                 
this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
1673             }
1674             
else {
1675                 
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(name));
1676             }
1677             
if ((gen == null)) {
1678                 
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1679             }
1680             
else {
1681                 
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(gen));
1682             }
1683             
if ((age == null)) {
1684                 
this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1685             }
1686             
else {
1687                 
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(age));
1688             }
1689             
if ((contact == null)) {
1690                 
this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1691             }
1692             
else {
1693                 
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(contact));
1694             }
1695             
if ((addr == null)) {
1696                 
this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1697             }
1698             
else {
1699                 
this.Adapter.InsertCommand.Parameters[4].Value = ((string)(addr));
1700             }
1701             
if ((disease == null)) {
1702                 
this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1703             }
1704             
else {
1705                 
this.Adapter.InsertCommand.Parameters[5].Value = ((string)(disease));
1706             }
1707             
if ((date_in == null)) {
1708                 
this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
1709             }
1710             
else {
1711                 
this.Adapter.InsertCommand.Parameters[6].Value = ((string)(date_in));
1712             }
1713             
if ((date_out == null)) {
1714                 
this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
1715             }
1716             
else {
1717                 
this.Adapter.InsertCommand.Parameters[7].Value = ((string)(date_out));
1718             }
1719             
if ((build == null)) {
1720                 
this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value;
1721             }
1722             
else {
1723                 
this.Adapter.InsertCommand.Parameters[8].Value = ((string)(build));
1724             }
1725             
if ((r_no == null)) {
1726                 
this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value;
1727             }
1728             
else {
1729                 
this.Adapter.InsertCommand.Parameters[9].Value = ((string)(r_no));
1730             }
1731             
if ((r_type == null)) {
1732                 
this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value;
1733             }
1734             
else {
1735                 
this.Adapter.InsertCommand.Parameters[10].Value = ((string)(r_type));
1736             }
1737             
if ((status == null)) {
1738                 
this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value;
1739             }
1740             
else {
1741                 
this.Adapter.InsertCommand.Parameters[11].Value = ((string)(status));
1742             }
1743             
if ((med_price == null)) {
1744                 
this.Adapter.InsertCommand.Parameters[12].Value = global::System.DBNull.Value;
1745             }
1746             
else {
1747                 
this.Adapter.InsertCommand.Parameters[12].Value = ((string)(med_price));
1748             }
1749             
if ((total == null)) {
1750                 
this.Adapter.InsertCommand.Parameters[13].Value = global::System.DBNull.Value;
1751             }
1752             
else {
1753                 
this.Adapter.InsertCommand.Parameters[13].Value = ((string)(total));
1754             }
1755             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1756             
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1757                         !=
global::System.Data.ConnectionState.Open)) {
1758                 
this.Adapter.InsertCommand.Connection.Open();
1759             }
1760             
try {
1761                 
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1762                 
return returnValue;
1763             }
1764             
finally {
1765                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1766                     
this.Adapter.InsertCommand.Connection.Close();
1767                 }
1768             }
1769         }
1770         
1771         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1772         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1773         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1774         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1775         
public virtual int Update(
1776                     
string name,
1777                     
string gen,
1778                     
string age,
1779                     
string contact,
1780                     
string addr,
1781                     
string disease,
1782                     
string date_in,
1783                     
string date_out,
1784                     
string build,
1785                     
string r_no,
1786                     
string r_type,
1787                     
string status,
1788                     
string med_price,
1789                     
string total,
1790                     
int Original_Id,
1791                     
string Original_name,
1792                     
string Original_gen,
1793                     
string Original_age,
1794                     
string Original_contact,
1795                     
string Original_addr,
1796                     
string Original_disease,
1797                     
string Original_date_in,
1798                     
string Original_date_out,
1799                     
string Original_build,
1800                     
string Original_r_no,
1801                     
string Original_r_type,
1802                     
string Original_status,
1803                     
string Original_med_price,
1804                     
string Original_total,
1805                     
int Id) {
1806             
if ((name == null)) {
1807                 
this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
1808             }
1809             
else {
1810                 
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(name));
1811             }
1812             
if ((gen == null)) {
1813                 
this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
1814             }
1815             
else {
1816                 
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(gen));
1817             }
1818             
if ((age == null)) {
1819                 
this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1820             }
1821             
else {
1822                 
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(age));
1823             }
1824             
if ((contact == null)) {
1825                 
this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1826             }
1827             
else {
1828                 
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(contact));
1829             }
1830             
if ((addr == null)) {
1831                 
this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1832             }
1833             
else {
1834                 
this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(addr));
1835             }
1836             
if ((disease == null)) {
1837                 
this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
1838             }
1839             
else {
1840                 
this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(disease));
1841             }
1842             
if ((date_in == null)) {
1843                 
this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
1844             }
1845             
else {
1846                 
this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(date_in));
1847             }
1848             
if ((date_out == null)) {
1849                 
this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
1850             }
1851             
else {
1852                 
this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(date_out));
1853             }
1854             
if ((build == null)) {
1855                 
this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
1856             }
1857             
else {
1858                 
this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(build));
1859             }
1860             
if ((r_no == null)) {
1861                 
this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value;
1862             }
1863             
else {
1864                 
this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(r_no));
1865             }
1866             
if ((r_type == null)) {
1867                 
this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1868             }
1869             
else {
1870                 
this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(r_type));
1871             }
1872             
if ((status == null)) {
1873                 
this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value;
1874             }
1875             
else {
1876                 
this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(status));
1877             }
1878             
if ((med_price == null)) {
1879                 
this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1880             }
1881             
else {
1882                 
this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(med_price));
1883             }
1884             
if ((total == null)) {
1885                 
this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value;
1886             }
1887             
else {
1888                 
this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(total));
1889             }
1890             
this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_Id));
1891             
if ((Original_name == null)) {
1892                 
this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
1893                 
this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
1894             }
1895             
else {
1896                 
this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
1897                 
this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_name));
1898             }
1899             
if ((Original_gen == null)) {
1900                 
this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
1901                 
this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value;
1902             }
1903             
else {
1904                 
this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
1905                 
this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_gen));
1906             }
1907             
if ((Original_age == null)) {
1908                 
this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1));
1909                 
this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value;
1910             }
1911             
else {
1912                 
this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0));
1913                 
this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_age));
1914             }
1915             
if ((Original_contact == null)) {
1916                 
this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1));
1917                 
this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value;
1918             }
1919             
else {
1920                 
this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0));
1921                 
this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_contact));
1922             }
1923             
if ((Original_addr == null)) {
1924                 
this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1));
1925                 
this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value;
1926             }
1927             
else {
1928                 
this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0));
1929                 
this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_addr));
1930             }
1931             
if ((Original_disease == null)) {
1932                 
this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1));
1933                 
this.Adapter.UpdateCommand.Parameters[26].Value = global::System.DBNull.Value;
1934             }
1935             
else {
1936                 
this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0));
1937                 
this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_disease));
1938             }
1939             
if ((Original_date_in == null)) {
1940                 
this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1));
1941                 
this.Adapter.UpdateCommand.Parameters[28].Value = global::System.DBNull.Value;
1942             }
1943             
else {
1944                 
this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0));
1945                 
this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_date_in));
1946             }
1947             
if ((Original_date_out == null)) {
1948                 
this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1));
1949                 
this.Adapter.UpdateCommand.Parameters[30].Value = global::System.DBNull.Value;
1950             }
1951             
else {
1952                 
this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0));
1953                 
this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_date_out));
1954             }
1955             
if ((Original_build == null)) {
1956                 
this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(1));
1957                 
this.Adapter.UpdateCommand.Parameters[32].Value = global::System.DBNull.Value;
1958             }
1959             
else {
1960                 
this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(0));
1961                 
this.Adapter.UpdateCommand.Parameters[32].Value = ((string)(Original_build));
1962             }
1963             
if ((Original_r_no == null)) {
1964                 
this.Adapter.UpdateCommand.Parameters[33].Value = ((object)(1));
1965                 
this.Adapter.UpdateCommand.Parameters[34].Value = global::System.DBNull.Value;
1966             }
1967             
else {
1968                 
this.Adapter.UpdateCommand.Parameters[33].Value = ((object)(0));
1969                 
this.Adapter.UpdateCommand.Parameters[34].Value = ((string)(Original_r_no));
1970             }
1971             
if ((Original_r_type == null)) {
1972                 
this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(1));
1973                 
this.Adapter.UpdateCommand.Parameters[36].Value = global::System.DBNull.Value;
1974             }
1975             
else {
1976                 
this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(0));
1977                 
this.Adapter.UpdateCommand.Parameters[36].Value = ((string)(Original_r_type));
1978             }
1979             
if ((Original_status == null)) {
1980                 
this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(1));
1981                 
this.Adapter.UpdateCommand.Parameters[38].Value = global::System.DBNull.Value;
1982             }
1983             
else {
1984                 
this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(0));
1985                 
this.Adapter.UpdateCommand.Parameters[38].Value = ((string)(Original_status));
1986             }
1987             
if ((Original_med_price == null)) {
1988                 
this.Adapter.UpdateCommand.Parameters[39].Value = ((object)(1));
1989                 
this.Adapter.UpdateCommand.Parameters[40].Value = global::System.DBNull.Value;
1990             }
1991             
else {
1992                 
this.Adapter.UpdateCommand.Parameters[39].Value = ((object)(0));
1993                 
this.Adapter.UpdateCommand.Parameters[40].Value = ((string)(Original_med_price));
1994             }
1995             
if ((Original_total == null)) {
1996                 
this.Adapter.UpdateCommand.Parameters[41].Value = ((object)(1));
1997                 
this.Adapter.UpdateCommand.Parameters[42].Value = global::System.DBNull.Value;
1998             }
1999             
else {
2000                 
this.Adapter.UpdateCommand.Parameters[41].Value = ((object)(0));
2001                 
this.Adapter.UpdateCommand.Parameters[42].Value = ((string)(Original_total));
2002             }
2003             
this.Adapter.UpdateCommand.Parameters[43].Value = ((int)(Id));
2004             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
2005             
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
2006                         !=
global::System.Data.ConnectionState.Open)) {
2007                 
this.Adapter.UpdateCommand.Connection.Open();
2008             }
2009             
try {
2010                 
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
2011                 
return returnValue;
2012             }
2013             
finally {
2014                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
2015                     
this.Adapter.UpdateCommand.Connection.Close();
2016                 }
2017             }
2018         }
2019         
2020         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2021         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2022         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
2023         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
2024         
public virtual int Update(
2025                     
string name,
2026                     
string gen,
2027                     
string age,
2028                     
string contact,
2029                     
string addr,
2030                     
string disease,
2031                     
string date_in,
2032                     
string date_out,
2033                     
string build,
2034                     
string r_no,
2035                     
string r_type,
2036                     
string status,
2037                     
string med_price,
2038                     
string total,
2039                     
int Original_Id,
2040                     
string Original_name,
2041                     
string Original_gen,
2042                     
string Original_age,
2043                     
string Original_contact,
2044                     
string Original_addr,
2045                     
string Original_disease,
2046                     
string Original_date_in,
2047                     
string Original_date_out,
2048                     
string Original_build,
2049                     
string Original_r_no,
2050                     
string Original_r_type,
2051                     
string Original_status,
2052                     
string Original_med_price,
2053                     
string Original_total) {
2054             
return this.Update(name, gen, age, contact, addr, disease, date_in, date_out, build, r_no, r_type, status, med_price, total, Original_Id, Original_name, Original_gen, Original_age, Original_contact, Original_addr, Original_disease, Original_date_in, Original_date_out, Original_build, Original_r_no, Original_r_type, Original_status, Original_med_price, Original_total, Original_Id);
2055         }
2056     }

2057     
2058     ///
<summary>
2059     ///
TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
2060     ///</summary>

2061     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
2062     
[global::System.ComponentModel.ToolboxItem(true)]
2063     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
2064         
"esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
2065     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
2066     
public partial class TableAdapterManager : global::System.ComponentModel.Component {
2067         
2068         
private UpdateOrderOption _updateOrder;
2069         
2070         
private checkoutTableAdapter _checkoutTableAdapter;
2071         
2072         
private bool _backupDataSetBeforeUpdate;
2073         
2074         
private global::System.Data.IDbConnection _connection;
2075         
2076         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2077         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2078         
public UpdateOrderOption UpdateOrder {
2079             
get {
2080                 
return this._updateOrder;
2081             }
2082             
set {
2083                 
this._updateOrder = value;
2084             }
2085         }
2086         
2087         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2088         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2089         [
global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
2090             
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
2091             
"a", "System.Drawing.Design.UITypeEditor")]
2092         
public checkoutTableAdapter checkoutTableAdapter {
2093             
get {
2094                 
return this._checkoutTableAdapter;
2095             }
2096             
set {
2097                 
this._checkoutTableAdapter = value;
2098             }
2099         }
2100         
2101         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2102         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2103         
public bool BackupDataSetBeforeUpdate {
2104             
get {
2105                 
return this._backupDataSetBeforeUpdate;
2106             }
2107             
set {
2108                 
this._backupDataSetBeforeUpdate = value;
2109             }
2110         }
2111         
2112         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2113         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2114         
[global::System.ComponentModel.Browsable(false)]
2115         
public global::System.Data.IDbConnection Connection {
2116             
get {
2117                 
if ((this._connection != null)) {
2118                     
return this._connection;
2119                 }
2120                 
if (((this._checkoutTableAdapter != null)
2121                             && (
this._checkoutTableAdapter.Connection != null))) {
2122                     
return this._checkoutTableAdapter.Connection;
2123                 }
2124                 
return null;
2125             }
2126             
set {
2127                 
this._connection = value;
2128             }
2129         }
2130         
2131         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2132         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2133         
[global::System.ComponentModel.Browsable(false)]
2134         
public int TableAdapterInstanceCount {
2135             
get {
2136                 
int count = 0;
2137                 
if ((this._checkoutTableAdapter != null)) {
2138                     count = (count +
1);
2139                 }
2140                 
return count;
2141             }
2142         }

2143         
2144         ///
<summary>
2145         ///
Update rows in top-down order.
2146         ///</summary>

2147         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2148         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2149         
private int UpdateUpdatedRows(hospitalDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
2150             
int result = 0;
2151             
if ((this._checkoutTableAdapter != null)) {
2152                 
global::System.Data.DataRow[] updatedRows = dataSet.checkout.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
2153                 updatedRows =
this.GetRealUpdatedRows(updatedRows, allAddedRows);
2154                 
if (((updatedRows != null)
2155                             && (
0 < updatedRows.Length))) {
2156                     result = (result +
this._checkoutTableAdapter.Update(updatedRows));
2157                     allChangedRows.AddRange(updatedRows);
2158                 }
2159             }
2160             
return result;
2161         }

2162         
2163         ///
<summary>
2164         ///
Insert rows in top-down order.
2165         ///</summary>

2166         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2167         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2168         
private int UpdateInsertedRows(hospitalDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
2169             
int result = 0;
2170             
if ((this._checkoutTableAdapter != null)) {
2171                 
global::System.Data.DataRow[] addedRows = dataSet.checkout.Select(null, null, global::System.Data.DataViewRowState.Added);
2172                 
if (((addedRows != null)
2173                             && (
0 < addedRows.Length))) {
2174                     result = (result +
this._checkoutTableAdapter.Update(addedRows));
2175                     allAddedRows.AddRange(addedRows);
2176                 }
2177             }
2178             
return result;
2179         }

2180         
2181         ///
<summary>
2182         ///
Delete rows in bottom-up order.
2183         ///</summary>

2184         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2185         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2186         
private int UpdateDeletedRows(hospitalDataSet3 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
2187             
int result = 0;
2188             
if ((this._checkoutTableAdapter != null)) {
2189                 
global::System.Data.DataRow[] deletedRows = dataSet.checkout.Select(null, null, global::System.Data.DataViewRowState.Deleted);
2190                 
if (((deletedRows != null)
2191                             && (
0 < deletedRows.Length))) {
2192                     result = (result +
this._checkoutTableAdapter.Update(deletedRows));
2193                     allChangedRows.AddRange(deletedRows);
2194                 }
2195             }
2196             
return result;
2197         }

2198         
2199         ///
<summary>
2200         ///
Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
2201         ///</summary>

2202         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2203         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2204         
private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
2205             
if (((updatedRows == null)
2206                         || (updatedRows.Length <
1))) {
2207                 
return updatedRows;
2208             }
2209             
if (((allAddedRows == null)
2210                         || (allAddedRows.Count <
1))) {
2211                 
return updatedRows;
2212             }
2213             
global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
2214             
for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
2215                 
global::System.Data.DataRow row = updatedRows[i];
2216                 
if ((allAddedRows.Contains(row) == false)) {
2217                     realUpdatedRows.Add(row);
2218                 }
2219             }
2220             
return realUpdatedRows.ToArray();
2221         }

2222         
2223         ///
<summary>
2224         ///
Update all changes to the dataset.
2225         ///</summary>

2226         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2227         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2228         
public virtual int UpdateAll(hospitalDataSet3 dataSet) {
2229             
if ((dataSet == null)) {
2230                 
throw new global::System.ArgumentNullException("dataSet");
2231             }
2232             
if ((dataSet.HasChanges() == false)) {
2233                 
return 0;
2234             }
2235             
if (((this._checkoutTableAdapter != null)
2236                         && (
this.MatchTableAdapterConnection(this._checkoutTableAdapter.Connection) == false))) {
2237                 
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
2238                         
"tring.");
2239             }
2240             
global::System.Data.IDbConnection workConnection = this.Connection;
2241             
if ((workConnection == null)) {
2242                 
throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
2243                         
"ger TableAdapter property to a valid TableAdapter instance.");
2244             }
2245             
bool workConnOpened = false;
2246             
if (((workConnection.State & global::System.Data.ConnectionState.Broken)
2247                         ==
global::System.Data.ConnectionState.Broken)) {
2248                 workConnection.Close();
2249             }
2250             
if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
2251                 workConnection.Open();
2252                 workConnOpened =
true;
2253             }
2254             
global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
2255             
if ((workTransaction == null)) {
2256                 
throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
2257                         
"ctions or the current state is not allowing the transaction to begin.");
2258             }
2259             
global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
2260             
global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
2261             
global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
2262             
global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
2263             
int result = 0;
2264             
global::System.Data.DataSet backupDataSet = null;
2265             
if (this.BackupDataSetBeforeUpdate) {
2266                 backupDataSet =
new global::System.Data.DataSet();
2267                 backupDataSet.Merge(dataSet);
2268             }
2269             
try {
2270                 
// ---- Prepare for update -----------
2271                 
//
2272                 
if ((this._checkoutTableAdapter != null)) {
2273                     revertConnections.Add(
this._checkoutTableAdapter, this._checkoutTableAdapter.Connection);
2274                     
this._checkoutTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
2275                     
this._checkoutTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
2276                     
if (this._checkoutTableAdapter.Adapter.AcceptChangesDuringUpdate) {
2277                         
this._checkoutTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
2278                         adaptersWithAcceptChangesDuringUpdate.Add(
this._checkoutTableAdapter.Adapter);
2279                     }
2280                 }
2281                 
//
2282                 
//---- Perform updates -----------
2283                 
//
2284                 
if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
2285                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
2286                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
2287                 }
2288                 
else {
2289                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
2290                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
2291                 }
2292                 result = (result +
this.UpdateDeletedRows(dataSet, allChangedRows));
2293                 
//
2294                 
//---- Commit updates -----------
2295                 
//
2296                 workTransaction.Commit();
2297                 
if ((0 < allAddedRows.Count)) {
2298                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
2299                     allAddedRows.CopyTo(rows);
2300                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
2301                         
global::System.Data.DataRow row = rows[i];
2302                         row.AcceptChanges();
2303                     }
2304                 }
2305                 
if ((0 < allChangedRows.Count)) {
2306                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
2307                     allChangedRows.CopyTo(rows);
2308                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
2309                         
global::System.Data.DataRow row = rows[i];
2310                         row.AcceptChanges();
2311                     }
2312                 }
2313             }
2314             
catch (global::System.Exception ex) {
2315                 workTransaction.Rollback();
2316                 
// ---- Restore the dataset -----------
2317                 
if (this.BackupDataSetBeforeUpdate) {
2318                     
global::System.Diagnostics.Debug.Assert((backupDataSet != null));
2319                     dataSet.Clear();
2320                     dataSet.Merge(backupDataSet);
2321                 }
2322                 
else {
2323                     
if ((0 < allAddedRows.Count)) {
2324                         
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
2325                         allAddedRows.CopyTo(rows);
2326                         
for (int i = 0; (i < rows.Length); i = (i + 1)) {
2327                             
global::System.Data.DataRow row = rows[i];
2328                             row.AcceptChanges();
2329                             row.SetAdded();
2330                         }
2331                     }
2332                 }
2333                 
throw ex;
2334             }
2335             
finally {
2336                 
if (workConnOpened) {
2337                     workConnection.Close();
2338                 }
2339                 
if ((this._checkoutTableAdapter != null)) {
2340                     
this._checkoutTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._checkoutTableAdapter]));
2341                     
this._checkoutTableAdapter.Transaction = null;
2342                 }
2343                 
if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
2344                     
global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
2345                     adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
2346                     
for (int i = 0; (i < adapters.Length); i = (i + 1)) {
2347                         
global::System.Data.Common.DataAdapter adapter = adapters[i];
2348                         adapter.AcceptChangesDuringUpdate =
true;
2349                     }
2350                 }
2351             }
2352             
return result;
2353         }
2354         
2355         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2356         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2357         
protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
2358             
global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
2359         }
2360         
2361         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2362         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2363         
protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
2364             
if ((this._connection != null)) {
2365                 
return true;
2366             }
2367             
if (((this.Connection == null)
2368                         || (inputConnection ==
null))) {
2369                 
return true;
2370             }
2371             
if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
2372                 
return true;
2373             }
2374             
return false;
2375         }

2376         
2377         ///
<summary>
2378         ///
Update Order Option
2379         ///</summary>

2380         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2381         
public enum UpdateOrderOption {
2382             
2383             InsertUpdateDelete =
0,
2384             
2385             UpdateInsertDelete =
1,
2386         }

2387         
2388         ///
<summary>
2389         ///
Used to sort self-referenced table's rows
2390         ///</summary>

2391         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2392         
private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
2393             
2394             
private global::System.Data.DataRelation _relation;
2395             
2396             
private int _childFirst;
2397             
2398             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2399             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2400             
internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
2401                 
this._relation = relation;
2402                 
if (childFirst) {
2403                     
this._childFirst = -1;
2404                 }
2405                 
else {
2406                     
this._childFirst = 1;
2407                 }
2408             }
2409             
2410             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2411             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2412             
private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
2413                 
global::System.Diagnostics.Debug.Assert((row != null));
2414                 
global::System.Data.DataRow root = row;
2415                 distance =
0;
2416
2417                 
global::System.Collections.Generic.IDictionary<global::System.Data.DataRow, global::System.Data.DataRow> traversedRows = new global::System.Collections.Generic.Dictionary<global::System.Data.DataRow, global::System.Data.DataRow>();
2418                 traversedRows[row] = row;
2419
2420                 
global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
2421                 
for (
2422                 ; ((parent !=
null)
2423                             && (traversedRows.ContainsKey(parent) ==
false));
2424                 ) {
2425                     distance = (distance +
1);
2426                     root = parent;
2427                     traversedRows[parent] = parent;
2428                     parent = parent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Default);
2429                 }
2430
2431                 
if ((distance == 0)) {
2432                     traversedRows.Clear();
2433                     traversedRows[row] = row;
2434                     parent = row.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Original);
2435                     
for (
2436                     ; ((parent !=
null)
2437                                 && (traversedRows.ContainsKey(parent) ==
false));
2438                     ) {
2439                         distance = (distance +
1);
2440                         root = parent;
2441                         traversedRows[parent] = parent;
2442                         parent = parent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Original);
2443                     }
2444                 }
2445
2446                 
return root;
2447             }
2448             
2449             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2450             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
2451             
public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
2452                 
if (object.ReferenceEquals(row1, row2)) {
2453                     
return 0;
2454                 }
2455                 
if ((row1 == null)) {
2456                     
return -1;
2457                 }
2458                 
if ((row2 == null)) {
2459                     
return 1;
2460                 }
2461
2462                 
int distance1 = 0;
2463                 
global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
2464
2465                 
int distance2 = 0;
2466                 
global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
2467
2468                 
if (object.ReferenceEquals(root1, root2)) {
2469                     
return (this._childFirst * distance1.CompareTo(distance2));
2470                 }
2471                 
else {
2472                     
global::System.Diagnostics.Debug.Assert(((root1.Table != null)
2473                                     && (root2.Table !=
null)));
2474                     
if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
2475                         
return -1;
2476                     }
2477                     
else {
2478                         
return 1;
2479                     }
2480                 }
2481             }
2482         }
2483     }
2484 }
2485
2486 #pragma warning restore
1591


Gõ tìm kiếm nhanh...